/*
 * taskMgr.h
 *
 *  Created on: Apr 19, 2015
 *      Author: mxw
 */

#ifndef TASKMGR_H_
#define TASKMGR_H_

typedef int (*TASK_ENTRY_FUN)(void*);

void init_task();
int tsk_new(int priority, TASK_ENTRY_FUN entry, void* tsk_param, const char* tsk_name);
int tsk_run(int tsk_id);
int tsk_stop(int tsk_id);

int tsk_enable_schedule(int tsk_id);
int tsk_disable_schedule(int tsk_id);
int get_current_tsk_id();
int tm_on_swi_reshedule_tsk();

int sleep(int ms);

int tm_dump_all_tsk_info();
int tm_tsk_info_brief();
int tm_dump_1tsk_info(int tsk_id);

#endif /* TASKMGR_H_ */
